package com.itlong.cloud.paymenthub;

import com.itlong.cloud.POJO.DTO.operate.OperateProductTypeManageGetDTO;
import com.itlong.cloud.POJO.VO.MessageVO;
import com.itlong.cloud.POJO.VO.operate.OperateAssignProductModelRelationGetVO;
import com.itlong.cloud.POJO.VO.operate.OperateProductTypeManageGetVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      运营-产品类型管理暴露接口
 * </desc>
 *
 * @createDate 2020/12/02
 */
@FeignClient(name = "payment-hub-service")
public interface IOperateProductTypeManageServiceClient {


    /**
     * <desc>
     *      分页获取任务书产品类型信息
     * </desc>
     *
     * @param operateProductTypeManageGetDTO 获取任务书产品类型信息DTO
     * @return 分页任务书产品类型信息
     * @author pengwei
     * @createDate 2020/12/02
     */
    @PostMapping(path = "/operate/productTypeManage/getPage")
    Page<OperateProductTypeManageGetVO> getPage(@RequestBody OperateProductTypeManageGetDTO operateProductTypeManageGetDTO) throws Exception;

    /**
     * <desc>
     *      获取任务书产品类型信息详情
     * </desc>
     *
     * @param operateProductTypeManageGetDTO 获取任务书产品类型信息详情DTO
     * @return 任务书产品类型信息详情
     * @author pengwei
     * @createDate 2020/11/30
     */
    @PostMapping(path = "/operate/productTypeManage/getOne")
    OperateProductTypeManageGetVO   getOne(@RequestBody OperateProductTypeManageGetDTO operateProductTypeManageGetDTO)throws Exception;

    /**
     * <desc>
     *      任务书产品类型信息删除
     * </desc>
     *
     * @param dto 任务书产品类型dto
     * @return 任务书产品类型删除
     * @author pengwei
     * @createDate 2020/12/01
     */
    @PostMapping(path = "/operate/productTypeManage/delete")
    Integer   delete(@RequestBody OperateProductTypeManageGetDTO dto)throws Exception;

    /**
     * <desc>
     *      添加或者更新产品类型
     * </desc>
     *
     * @param dto 产品类型dto
     * @return
     * @author pengwei
     * @createDate 2020/12/03
     */
    @PostMapping(path = "/operate/productTypeManage/saveOrUpdate")
    MessageVO saveOrUpdate(@RequestBody OperateProductTypeManageGetDTO dto) throws Exception;

    /**
     * <desc>
     *      获取产品类型相关产品型号列表
     * </desc>
     *
     * @return 标准格式化响应结果
     * @author pengwei
     * @createDate 2020/12/03
     */
    @PostMapping(path = "/operate/productTypeManage/getRelatedProcModelPage")
    Page<OperateAssignProductModelRelationGetVO> getRelatedProcModelPage(@RequestBody OperateProductTypeManageGetDTO dto) throws Exception;

    /**
     * <desc>
     *      产品型号列表
     * </desc>
     *
     * @return 标准格式化响应结果
     * @author pengwei
     * @createDate 2020/12/02
     */
    @PostMapping(path = "/operate/productTypeManage/proModelSearch")
    Page<OperateAssignProductModelRelationGetVO> getProcModelPage(@RequestBody OperateProductTypeManageGetDTO dto) throws Exception;

    /**
     * <desc>
     *      获取产品类型下的产品信息列表
     * </desc>
     *
     * @param productType 产品类型 1电梯类2门禁类 3人脸类 4对讲类
     * @return
     * @Author Zhu.yj
     * @createDate  2021/2/22
     */
    @PostMapping("/operate/productTypeManage/getAssignmentTypeList")
    List<Map<String, Object>> getAssignmentTypeList(@RequestParam("productType") String productType) throws Exception;
}
